application: Allow sub-classes to override the Window creation
authorEmmanuele Bassi <ebassi@linux.intel.com>
Thu, 17 Jun 2010 14:41:12 +0000 (15:41 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Thu, 17 Jun 2010 14:41:12 +0000 (15:41 +0100)
commit4f357dbf956d2be0249e7f5aec7050ed05ba1b7b
tree9618b2d3530f4ae825f8d89b336a92eaab8bb55a
parentb74fb44c115c61745d691fc2da7aef5505f6eccd
application: Allow sub-classes to override the Window creation

Sub-classes of GtkApplication might want to override the way an
application window is created - for instance, to hook into GtkBuilder
or to set up some basic UI or state.

A new GtkApplication::create_window() virtual function is added to the
GtkApplicationClass vtable, which returns the newly created GtkWindow.
The gtk_application_create_window() function calls the vfunc and adds
the returned window to the list of windows managed by the application
instance.

Calling gtk_application_add_window() will also set the default window,
if one is not already set.

This commit also removes a spurious g_object_ref_sink() on the newly
created GtkWindow.
gtk/gtk.symbols
gtk/gtkapplication.c
gtk/gtkapplication.h